package com.khshop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.khshop.pojo.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.khshop.pojo.Order;
import com.khshop.vo.ServiceResult;

import java.util.Map;

/**
 * <p>
 * 评论 服务类
 * </p>
 *
 * @author zhaoyang
 * @since 2020-10-15
 */
public interface CommentService extends IService<Comment> {

    //前端发表评价【要求订单状态为待评价才可以发表评价信息，并考虑过滤敏感数据】
    public ServiceResult<Comment> addComment(Comment comment);

    //后端展示评价数据列表
    public ServiceResult<IPage<Comment>> showComment(Integer page, Integer limit);

    //后端删除评价数据
    public ServiceResult<Comment> delComment(Long []id);

    //回复评价【考虑一条评价可以追加回复内容】
    public ServiceResult<Comment> replyComment(Long id,String newComment);

    //根据条件查询评价数据
    public ServiceResult<IPage<Comment>> searchComment(Map<String,Object> map, Integer page, Integer limit);

    //审核
    public ServiceResult<Comment> checkComment(Long id);
}
